package lab01;

import java.util.Scanner;

import static java.lang.System.in;

public class Test06 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(in);
        System.out.println("请输入成绩：");
        int a = sc.nextInt();                   //a为学生成绩
        ifelse(a);
        switchs(a);
    }
    public static void ifelse(int a) {
        if (a == 1) {
            System.out.println("不及格");
        }else if (a == 2) {
            System.out.println("及格");
        }else if (a == 3) {
            System.out.println("中等");
        }else if (a == 4) {
            System.out.println("良好");
        }else if (a == 5) {
            System.out.println("优秀");
        }
    }
    public static void switchs(int a) {
        switch (a) {
            case 1:
                System.out.println("不及格");
            case 2:
                System.out.println("及格");
            case 3:
                System.out.println("中等");
            case 4:
                System.out.println("良好");
            case 5:
                System.out.println("优秀");
        }
    }
}
